<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <script type="text/javascript" src="__JS__/rem.js"></script>
    <script type="text/javascript" src="__JS__/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="__JS__/swiper.min.js"></script>
    <script src="__SALEMAN__/js/zepto.min.js"></script>
        <link href="http://cdn.bootcss.com/weui/1.0.2/style/weui.min.css" rel="stylesheet">          
    <link type="text/css" rel="stylesheet" href="__CSS__/public.css" />
    <link type="text/css" rel="stylesheet" href="__CSS__/clinic.css" />
    <link type="text/css" rel="stylesheet" href="__CSS__/swiper.min.css" />    
    <title>药品详情</title>
    <style type="text/css">
    .add_cart_btn {
      padding: 3px 10px;
      border: 1px solid #ccc;
      border-radius: 5px;
      background: #6db0e4;
      color: #fff;
      float:right;
      height:50px;
      text-align:center;
    </style>
</head>
<body>
    <div class="P_Header">
        <div class="P_main">
            <h2 class="P_title">药品详情</h2>
            <span class="P_goBack"><!--<a href="javascript:window.history.back(-1)"><img src="/Public/Home/Saleman/images/back_icon.png" alt="" style="width:10px;height:20px;"></a>-->
               <a href="javascript:window.history.back(-1)" id="my_back_btn" class='h_back_1'><i></i></a>
            </span>
        </div>
    </div>
    <div class="P_con drugDet no_pad">
        <div class="P_main bg_f">
            <div class="P_banner">
                <div class="swiper-container">
                    <div class="swiper-wrapper">
                        <div class="swiper-slide"><img src="{$drugs['cover_img']}"/></div>
                        <div class="swiper-slide"><img src="{$drugs['cover_img']}"/></div>
                        <div class="swiper-slide"><img src="{$drugs['cover_img']}"/></div>
                    </div>
                    <div class="swiper-pagination"></div>
                </div>        
            </div>
            <div class="info">
                <h6 class="singleLine c_333">{$drugs['name']}</h6>
                <div class="ov_h singleLine">
                    <span class="c_red left">￥{$drugs['price']}</span>
                    <!--<em><i class="c_blue right" id="cart" data="{$drugs['id']}">&#xe60a;</i></em>-->
                     <span class = "add_cart_btn add_drugs_cart c_blue right" pos_title="确定加入购物车" id="cart" data="{$drugs['id']}" pos_id="52">加入购物车</span>

                </div> 
                <div class="subTit c_999">
                    <p class="singleLine">详细说明</p>
                    <span class="line"></span>
                </div>
               <!--<div class="shuoming">{$drugs['attending']}</div>-->
               <div class="shuoming goods-info">
                    <div class="goods-info-table">
                      <table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
                      <tr>
                                <td align="left" valign="top" class="info-title">批准文号</td>
                                <td align="left" valign="top" class="info-content">{$drugs['approval_number']}</td>
                              </tr>

                      <tr>
                                <td align="left" valign="top" class="info-title">主治功能</td>
                                <td align="left" valign="top" class="info-content">{$drugs['attending']}</td>
                              </tr>
                              <tr>
                                <td align="left" valign="top" class="info-title">用法用量</td>
                                <td align="left" valign="top" class="info-content">
					<?php 
				$str = str_replace("\r\n","<br />",$drugs['usage']); 
				echo(html_entity_decode($str,ENT_QUOTES));
			?>
				</td>
                              </tr>
                              <tr>
                                <td align="left" valign="top" class="info-title">主要成分</td>
                                <td align="left" valign="top" class="info-content">{$drugs['ingredients']}</td>
                              </tr>
                               <tr>
                                <td align="left" valign="top" class="info-title">规格</td>
                                <td align="left" valign="top" class="info-content">{$drugs['specifications']}</td>
                              </tr>                               
                               <tr>
                                <td align="left" valign="top" class="info-title">产品优势</td>
                                <td align="left" valign="top" class="info-content">
				<?php 
				$str = str_replace("\r\n","<br />",$drugs['advantage']);
				echo(html_entity_decode($str)); ?>
				</td>
                              </tr>
                               <tr>
                                <td align="left" valign="top" class="info-title">经营企业</td>
                                <td align="left" valign="top" class="info-content">{$drugs['enterprise']}</td>
                              </tr>

                              <tr>
                                <td align="left" valign="top" class="info-title">其他</td>
                                <td align="left" valign="top" class="info-content">
				<?php 
					$str = str_replace("\r\n","<br />",$drugs['remark']);
					echo(html_entity_decode($str)); ?>
				</td>
                              </tr>
                      </table>
                    </div>
                </div>
            </div>
            </div>
        </div>
    </div> 
    <include file="./Application/Home/View/default/Saleman/Public/popup.html"/>
   <script src = "__SaleManager__/js/androidback.js"></script>
    <script type="text/javascript">
        $(function(){
            var swiper = new Swiper(".swiper-container",{
                pagination:".swiper-pagination",
                autoplay : 3000,
                paginationClickable :true,
            })
            $('#cart').on('click', function () {
            var drugs_id = $(this).attr('data');
            $.ajax({
                url: "/Doctor/Clinic/Clinic/details",
                type: 'post',
                data: {drugs_id: drugs_id, num: 1},
               
                dataType: "json",
                success: function (result) {
                   
                    $("#iosDialog1").hide(200);
                    $('#iosDialog2').find('.sure-info').html(result['msg']);
                    $('#iosDialog2').show(200);
                    //window.location.href="/Doctor/Clinic/Clinic/order.html";
                   $(".weui-dialog__btn_primary").click(function(){
                             window.location.href="/Doctor/Clinic/Clinic/order.html";
                            })
                   
                }
            });
        });

        })
    </script>
</body>
</html>